//==================================================================
//  Copyright (C) 2006  Davide Pasca
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//==================================================================
///
///
///
///
///
//==================================================================

#ifndef CAMFLY_H
#define CAMFLY_H

#include "psys.h"
#include "pvector.h"
#include "pmatrix.h"

//==================================================================
class CamFly
{
	PMath::Vector3	_offs;
	PMath::Vector3	_ang;
	PMath::Vector3	_step_smooth;
	PMath::Vector3	_ang_smooth;
	PMath::Matrix44	_cam_mat;

public:
	//------------------------------------------------------------------
	CamFly() :
		_offs(0,0,0),
		_ang(0,0,0),
		_step_smooth(0,0,0),
		_ang_smooth(0,0,0)
	{
	}

	void	Setup(	float px, float py, float pz,
					float ax, float ay, float az );
	void	Update( float dpx, float dpy, float dpz,
				    float dax, float day, float daz );
	void	Update(void);

	const PMath::Matrix44	&GetMatrix(void) const;

	void	SetPosition( float x, float y, float z )
	{
		_offs.Set( x, y, z );
	}
	//------------------------------------------------------------------
	void	SetRotation( float rx, float ry, float rz )
	{
		_ang.Set( rx, ry, rz );
	}
};

#endif
